<script setup lang="ts">
import { useApp } from "@/hooks";
import router from "@/router";
// const toast = useGlobalToast()
const app = useApp()
console.log("app",app)
const onMsg = ()=>{
  // toast.success("测试4444")
  app.toast.success("测试2222")
}

// 页面跳转方法
function navigateTo(name: string) {
  router.push({
    name,
  })
}

</script>

<template>
   <div class="home">
     <div class="text-red">测试</div>
     <wd-button type="primary" @click="onMsg">提交信息</wd-button>
     <wd-button class="ml-1" type="warning" @click="navigateTo('style')">跳转</wd-button>
   </div>
</template>

<style scoped>
.home {
  padding: 5rem 2.5rem;
  text-align: center;
}
</style>
